home *** CD-ROM | disk | FTP | other *** search
- AIBehaviour.TestCase = {
- Name = "TestCase",
- first = 0,
-
-
- Properties = {
-
- fileLajno = "lalal",
- shit = 1,
- },
-
-
- -- SYSTEM EVENTS -----
- ---------------------------------------------
- OnSpawn = function(self , entity )
-
- AI:CreateGoalPipe("goodold");
- AI:PushGoal("goodold","firecmd",0,1);
- AI:PushGoal("goodold","run",0,1);
- AI:PushGoal("goodold","timeout",1,1);
- AI:PushGoal("goodold","hide",1,10,HM_NEAREST);
- --AI:PushGoal("goodold","signal",1,1,"PING_PONG",0);
-
- AI:CreateGoalPipe("pingpong");
- AI:PushGoal("pingpong","hide",1,10,HM_LEFTMOST_FROM_TARGET);
- AI:PushGoal("pingpong","signal",1,1,"waitrandom",0);
- AI:PushGoal("pingpong","hide",1,10,HM_RIGHTMOST_FROM_TARGET);
- AI:PushGoal("pingpong","signal",1,1,"waitrandom",0);
-
-
- AI:CreateGoalPipe("strafell");
- AI:PushGoal("strafell","strafe",0,1);
- AI:PushGoal("strafell","timeout",1,0.5);
- AI:PushGoal("strafell","strafe",0,0);
- AI:PushGoal("strafell","timeout",1,5);
- AI:PushGoal("strafell","signal",1,1,"PING_PONG",0);
-
-
- -------------------crate stuff
- AI:CreateGoalPipe("crate_maneuver");
- AI:PushGoal("crate_maneuver","locate",0,"pickup");
- AI:PushGoal("crate_maneuver","acqtarget",0,"");
- AI:PushGoal("crate_maneuver","timeout",1,1);
- AI:PushGoal("crate_maneuver","approach",1,2);
- AI:PushGoal("crate_maneuver","locate",0,200);
- AI:PushGoal("crate_maneuver","acqtarget",0,"");
- AI:PushGoal("crate_maneuver","approach",1,1);
- AI:PushGoal("crate_maneuver","signal",0,1,"BIND_CRATE_TO_ME",0);
- AI:PushGoal("crate_maneuver","locate",0,"drop");
- AI:PushGoal("crate_maneuver","acqtarget",0,"");
- AI:PushGoal("crate_maneuver","timeout",1,1);
- AI:PushGoal("crate_maneuver","approach",1,2);
- AI:PushGoal("crate_maneuver","signal",0,1,"UNBIND_CRATE",0);
-
- entity:SelectPipe(0,"crate_maneuver");
-
- end,
-
-
- BIND_CRATE_TO_ME = function( self,entity, sender )
- self.CRATE = AI:GetAttentionTargetOf(entity.id);
- if (self.CRATE) then
- self.CRATE:SetPos({x=0,y=0,z=2});
- self.CRATE:SetAngles({x=0,y=0,z=0});
- entity:Bind(self.CRATE);
- end
- end,
- UNBIND_CRATE = function( self,entity, sender )
- if (self.CRATE) then
- local mypos = entity:GetPos();
- mypos.x = mypos.x - 2;
- mypos.z = mypos.z + 2;
- entity:Unbind(self.CRATE);
- self.CRATE:SetPos(mypos);
- self.CRATE:SetAngles({x=0,y=0,z=0});
- self.CRATE:AwakePhysics(1);
- end
- end,
-
-
- ---------------------------------------------
- PING_PONG = function( self,entity, sender )
- entity:SelectPipe(0,"pingpong");
- end,
-
- waitrandom = function( self,entity, sender )
-
- local rnd = random(1,30);
- rnd = rnd / 10;
-
- AI:CreateGoalPipe("time");
- AI:PushGoal("time","timeout",1,rnd);
-
- System:LogToConsole("waiting for "..rnd);
- entity:InsertSubpipe(0,"time");
- end,
-
- ---------------------------------------------
- OnActivate = function(self, entity )
- end,
- ---------------------------------------------
- OnNoTarget = function(self, entity )
- end,
- ---------------------------------------------
- OnPlayerSeen = function(self, entity )
- if (self.first == 0) then
- entity:SelectPipe(0,"goodold");
- self.first = 1;
- end
- end,
- ---------------------------------------------
- OnPlayerMemory = function(self, entity )
- end,
- ---------------------------------------------
- OnEnemySeen = function(self, entity )
- end,
- ---------------------------------------------
- OnEnemyMemory = function(self, entity )
- end,
- ---------------------------------------------
- OnDeadFriendSeen = function(self,entity )
- end,
- ---------------------------------------------
- OnDeadEnemySeen = function(self,entity )
- end,
- ---------------------------------------------
- OnInterestingSoundHeard = function(self,entity )
- end,
- ---------------------------------------------
- OnThreateningSoundHeard = function( self,entity )
- end,
- ---------------------------------------------
- OnGunfireHeard = function(self,entity )
- end,
- ---------------------------------------------
- OnFootstepsHeard = function(self, entity )
- end,
- ---------------------------------------------
- OnGranateSeen = function(self, entity )
- end,
- ---------------------------------------------
- OnLongTimeNoTarget = function(self, entity )
- end,
- ---------------------------------------------
- OnDied = function( self,entity )
- end,
- ---------------------------------------------
- OnGroupMemberDied = function( self,entity )
- end,
- ---------------------------------------------
- ---------------------------------------------
- OnNoNearerHidingPlace = function( self,entity , sender)
- end,
- ---------------------------------------------
- OnNoHidingPlace = function( self,entity, sender )
- -- entity:SelectPipe(0,"strafell");
- System:LogToConsole("NO HIDING!!!!!!!!!!!!");
- end,
-
-
-
- }